#ifndef SIM_TRACE_H
#define SIM_TRACE_H

#include "uarch/settings.h"
#include "uarch/types.h"

#define RAND_SEED 0xBEEFDEAD
#define NUM_REGIONS 64
#define PER_REGION (1 << 12)
#define TRACE_BURSTS (1 << 11)
#define PROB_OF_RAND_ADVANCE 5
#define MAX_CLOCK_SKIP 32
#define PROD_CONS_SKIP 32

#define ZESTO_FREQ 1000.0

void dump_trace_queue ();
int sim_main(int trace_bursts);

class addresses {
  public:
    int index;
    paddr_t values[PER_REGION];

    addresses();
    ~addresses();

    void advance_sequence();
    void rand_sequence();

    void node_write (int core_id);
    void node_read (int core_id);
    void prod_consumer (int core_id, int num_sharers);
    void rw_chain (int num_nodes);
    void multinode_read (int num_sharers);
};

class array_addresses : public addresses {
  public:
    array_addresses();
    ~array_addresses();
};

class sequence_addresses : public addresses {
  public:
    sequence_addresses();
    ~sequence_addresses();
};

class random_addresses : public addresses {
  public:
    random_addresses();
    ~random_addresses();
};

#endif // SIM_TRACE_H
